Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-26680 INI Cache files are generated with wrong filepaths #1269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wawrzynkiewicz
Copy link

When publicAPI calls are executed via Symfony controller and for example a user is created via UserService, this Signal is triggered into legacy System cache management.

The eZINI::instance() is called inside user datatype which checks site.ini cache file. In the cache file are relative paths to override ini files which do not work because application is in Symfony context (and not cwd in legacy).

The override file is not found via file_exists() and the new generated cachefile is w/o override files cached, which "destroys" legacy application.

When publicAPI calls are executed via Symfony controller and for example a user is created via UserService, this Signal is triggered into legacy System cache management.

The eZINI::instance() is called inside user datatype which checks site.ini cache file. In the cache file are relative paths to override ini files which do not work because application is in Symfony context (and not cwd in legacy).

The override file is not found via file_exists() and the new generated cachefile is w/o override files cached, which "destroys" legacy application.
@andrerom
Copy link
Contributor

-1 Might be missing legacy fallback call which would make sure folder is right for legacy?

@gggeek
Copy link
Contributor

gggeek commented Nov 25, 2016

I was thinking along the same lines...

@wawrzynkiewicz
Copy link
Author

wawrzynkiewicz commented Nov 25, 2016

The requested ini file is always stored absolute, the additional one's relative. So there is a inconsistency on this...

<?php
// This is a auto generated ini cache file, time created:Fri, 25 Nov 16 12:23:32 +0100
$data = array(
'rev' => 2,
'created' => '2016-11-25T12:23:32+01:00',
'charset' => "utf-8",
'files' => array (0 => '/www/example/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',1 => 'settings/override/site.ini.append.php',
),
'file' => '/www/example/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',
'val' => array...

@joaoinacio
Copy link

IIUC,eZDir::path() should return an absolute path derived from [$rootDir, $overrideDir, $fileName].
If that is not the case, the issue could be elsewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants